//定义全局的险种编码
var riskwrapcode="";
//var wrapid = "";

var wrapid = "";
var wrapID = "";

//是否同意投保须知
var agreeFlag = "";
//没有点击查看投保须知
var clickBuyerGuide = "";

$(document).ready(function(){
	sessionStorage.setItem('xbflag','01');
	var item=$("#ErrInfo").val();
	if(!isEmpty(item)){
		mui.alert(item)
	}
	$("#ErrInfo").val("");
	var wrapid = $("#wrapid").val()
	var premium = $("#prem").val();
	//$("#premShow").html(premium);
	//var wrapid = $("#wrapid").val();
	var riskwrapcode = $("#riskwrapcode").val();
	
	ask(riskwrapcode,wrapid);
	//初始化
	initLoad();
	if(riskwrapcode=="ZZJ210"){
		$("#jihua").css("display", "none");
		$("#shebao").val($("#wrapid").val());
		var sheb= $("#shebao").val();
		//alert(sheb);
		if(sheb=="02"){
			$("#medical").html("有");
			//document.getElementById('medical').style.color="SlateGray";
			calcelement(wrapid)
			checkSheBao();
			//checkSheBao();
		}else if(sheb=="01"){
			$("#medical").html("无");
			
			calcelement(wrapid)
			checkSheBao();
		}
	}
	else if(riskwrapcode=="ZZJ202"){
		calcelement(wrapid)
		document.getElementById('medical').style.color="SlateGray";
		document.getElementById('idtypevalueShow').style.color="SlateGray";
		$("#medical").html("有");
	}
	else if(riskwrapcode=="ZZJ211"){
		if(wrapid=="02" || wrapid=="03"){
			calcelement(wrapid)
			checkPlan();
		}else if(wrapid=="01"){
			calcelement(wrapid)
			document.getElementById('idtypevalueShow').style.color="SlateGray";
		}
		//document.getElementById('idtypevalueShow').style.color="SlateGray";
		$("#yibao").css("display", "none");
		
		
	}
	else if(riskwrapcode=="ZZJ226"){
		if(wrapid=="02" || wrapid=="03"){
			calcelement(wrapid)
			checkPlan();
		}else if(wrapid=="01"){
			calcelement(wrapid)
			document.getElementById('idtypevalueShow').style.color="SlateGray";
		}
		
		
		$("#yibao").css("display", "none");
		
	}else if(riskwrapcode=="ZZJ302"){
        calcelement(wrapid);
        document.getElementById('medical').style.color="SlateGray";
        document.getElementById('idtypevalueShow').style.color="SlateGray";
        $("#medical").html("有");
	}else if(riskwrapcode=="ZZJ301"){
        calcelement(wrapid);
        checkshebao1();
        document.getElementById('medical').style.color="SlateGray";
        document.getElementById('idtypevalueShow').style.color="SlateGray";
        $("#medical").html("有");

	}
	//支付按钮变化
	if($("#riskwrapcode").val() == 'ZZJ301' || $("#riskwrapcode").val() == 'ZZJ302'){
			$("#toP").text("用医保余额投保");
			$("#hide").hide();
			//使用医保卡支付确认弹框
			document.getElementById("toP").addEventListener('tap', function() {
				console.log('tap');
					if(!check()){
							return;
					}
					var btnArray = ['关闭', '确认'];
					mui.confirm('将为您查询医保余额，扣款并出具电子保单', '温馨提示', btnArray, function(e) {
							if (e.index == 1) {
									console.log('tap yes');
									pay();
							}
					})
			});
			if(ErrInfo=='Y'){
					var btnArray = ['关闭', '确认'];
					mui.confirm('账户余额不足，是否使用支付宝支付？', '温馨提示', btnArray, function(e) {
							if (e.index == 1) {
									console.log(333);
									nextSY();
							}
					});
			}
	}else{
			$("#toP").text("继续支付");
	}


	// $("#toP").bind("click",function(){
	// 	console.log(1111);
	// 	if(!check())
	// 	{
	// 		return;
	// 	}
	// 	 layer.open({
	// 		    type: 2
	// 		    ,content: '正在跳转支付，请不要离开当前页面'
	// 		  });
	// 	//埋点，用来统计 
	// 	//meteor.track('shopping', {convert_id: 1619715212398599 });
	// 	playFlag=1;
	// 	console.log(222222222222);
	// 	$("#form1").submit();	
	// 	console.log(33333);

	// })

	

	
	function nextSY(){
        layer.open({
            type: 2
            ,content: '正在跳转支付，请不要离开当前页面'
        });
        window.location.href = basePath + '/renewanlController/toPaySY?orderNo='+$("#orderNo").val();
	}
//	阅读并同意，显示投保须知弹框
	$('.agreement').bind('click', function() {
		mui('#familyData').popover('shbiaow');
		clickBuyerGuide = "Y";
	});
	//《保险条款》点击的跳转样式显示
	$("#insClause").on("click", function() { 
		$("a[href='#item01']").addClass("mui-active");
		$("a[href='#item02']").removeClass("mui-active");
		$("a[href='#item03']").removeClass("mui-active");
		$("a[href='#item04']").removeClass("mui-active");
		$("#item01").addClass("mui-active"); 
		$("#item02").removeClass("mui-active");
		$("#item03").removeClass("mui-active");
		$("#item04").removeClass("mui-active");
	});
	//《投保须知》点击的跳转样式显示
	$("#insInsurance").on("click", function() {
		$("a[href='#item02']").addClass("mui-active");
		$("a[href='#item03']").removeClass("mui-active");
		$("a[href='#item01']").removeClass("mui-active");
		$("a[href='#item04']").removeClass("mui-active");
		$("#item02").addClass("mui-active");
		$("#item03").removeClass("mui-active");
		$("#item01").removeClass("mui-active");
		$("#item04").removeClass("mui-active");
	});
	//《客户告知书》点击的跳转样式显示
	$("#cusNotification").on("click", function() {
		$("a[href='#item03']").addClass("mui-active");
		$("a[href='#item01']").removeClass("mui-active");
		$("a[href='#item02']").removeClass("mui-active");
		$("a[href='#item04']").removeClass("mui-active");
		$("#item03").addClass("mui-active");
		$("#item01").removeClass("mui-active");
		$("#item02").removeClass("mui-active");
		$("#item04").removeClass("mui-active");
	});
	//《用户授权书》点击的跳转样式显示
	$("#authorization").on("click", function() {
		$("a[href='#item04']").addClass("mui-active");
		$("a[href='#item01']").removeClass("mui-active");
		$("a[href='#item02']").removeClass("mui-active");
		$("a[href='#item03']").removeClass("mui-active");
		$("#item04").addClass("mui-active");
		$("#item01").removeClass("mui-active");
		$("#item02").removeClass("mui-active");
		$("#item03").removeClass("mui-active");
	});
	//点击弹出《保险条款》《投保须知》《客户告知书》
	$('#InsuranceClauseClick').bind('click', function() {
		mui('#familyData').popover('show');
		clickBuyerGuide = "Y";
	});
	//关闭按钮  关闭遮罩层和健康告知
	$('#close').on('tap', function() {
		$('.mui-backdrop').hide();
		$('#familyData').removeClass('mui-active').hide();
	});
	
	//选择是否同意
	$('#checterm').click(function() {
		if(clickBuyerGuide=='N')
		{
			if("ZZJ301"==riskwrapcode || "ZZJ302"==riskwrapcode){
				mui.toast("请阅读《保险条款》、《投保须知》、《用户授权书》和《客户告知书》");
			}else{
				mui.toast("请阅读《保险条款》、《投保须知》和《客户告知书》");
			}
			$("#checterm").prop("checked", false);
			agreeFlag = 'N';
			return false;
		}
		if($("#checterm").is(":checked")){
			agreeFlag = 'Y';
		} else {
			agreeFlag = 'N';
		}
	});
	
})


function check(){
	if(agreeFlag=='N')
	{
		if("ZZJ301"==riskwrapcode || "ZZJ302"==riskwrapcode){
			mui.toast("请勾选：已阅读并同意《保险条款》、《投保须知》、《用户授权书》和《客户告知书》");
		}else{
			mui.toast("请勾选：已阅读并同意《保险条款》、《投保须知》和《客户告知书》");
		}
		return false;
	}
	return true;
	
}


function checkPlan(){
	var pickerIdType = new mui.PopPicker();
	$('body').on('tap','#insuredidtypeShow',function() {	
		var riskwrapcode = $("#riskwrapcode").val();
		$.ajax({
	        async: false,
	        type: "POST",
	        contentType: "application/json;charset=UTF-8",
	        url: basePath+'/writeContController/getplanNo',
	        data: "{\"riskWrapCode\": \""+riskwrapcode+"\"}",
	        dataType: 'json',
	        scriptCharset: 'utf-8',
	        success: function(data) {	
	        	var result =new Array();
	        	var obj={};
	        	var arr=[];
	        	for (var i = 0; i < data.length; i++) {
	        		var s = data[i].wrapID;
	        		
	        		if(obj[s]) continue;
	        		else{
	        			obj[s]=s;
	        			arr.push(s);
	        		}
	        		//var wrapID= arr;
				}
	        	if(riskwrapcode=='ZZJ226' || riskwrapcode=='ZZJ211'){
        			for(var i = 0; i < arr.length;i++){
        		        console.log(arr[i]);
        		        if(wrapid>=arr[i]){
	        			var showPlan = "";
		        		var showPlan=updateWrapid(arr[i]);
		        		result.push({value: wrapid,text: showPlan});
        		        }
        			 }
	        	}else{
	        		var showPlan = "";
	        		var showPlan=updateWrapid(wrapID);
	        		result.push({value: wrapid,text: showPlan});
	        	}
	        		pickerIdType.setData(result);
	        }
		})

			pickerIdType.show(function(selectItems) {
				
				//$('#insuredidtype').val(selectItems[0].value);
				var showPlan = selectItems[0].text;
				var wrapID =updateshowPlan(showPlan);
				if(wrapID=="01"){
					var wrapid ="01";
				}else if(wrapID=="02"){
					var wrapid ="02";
				}else if(wrapID=="03"){
					var wrapid ="03";
				}
				
				var time = "";
				$('#idtypevalueShow').html(selectItems[0].text);
				//var wrapid = selectItems[0].value;
				var riskwrapcode = $("#riskwrapcode").val();
				$("#wra").val(wrapID);
				//$("#wrapid").val()
				ask(riskwrapcode,wrapID);
				calcelement(wrapid)
			})

})	
}


function checkSheBao(){
	var pickerIdType = new mui.PopPicker();
	$('body').on('tap','#sheb',function() {
		var riskwrapcode = $("#riskwrapcode").val();
		$.ajax({
	        async: false,
	        type: "POST",
	        contentType: "application/json;charset=UTF-8",
	        url: basePath+'/writeContController/getshebao',
	        data: "{\"riskWrapCode\": \""+riskwrapcode+"\"}",
	        dataType: 'json',
	        scriptCharset: 'utf-8',
	        success: function(data) {	
	        	var result =new Array();
	        	var obj={};
	        	var arr=[];
	        	for (var i = 0; i < data.length; i++) {
	        		var s = data[i].wrapID;
	        		if(obj[s]) continue;
	        		else{
	        			obj[s]=s;
	        			arr.push(s);
	        		}
	        		var ID =  data[i].wrapID;
	        		var planID="";
	        		if(ID=="01"){
	        			planID="无"
	        		}else if(ID=="02"){
	        			planID="有"
	        		}
	        		result.push({value: ID,text: planID});
				}
	        	pickerIdType.setData(result);
	        }
})

		pickerIdType.show(function(selectItems) {
				
				$('#medical').html(selectItems[0].text);
				if(selectItems[0].text=="无"){
					planID="01"
        		}else if(selectItems[0].text=="有"){
        			planID="02"
        		}
				$("#shebao").val(planID)
				$("#wra").val(planID)
				wrapid=$("#shebao").val();
				ask(riskwrapcode,wrapid)
				calcelement(wrapid)
		})
	
	
})
	
	
}
function checkshebao1() {
    var pickerIdType = new mui.PopPicker();
    $('body').on('tap','#sheb',function() {
    var riskwrapcode = $("#riskwrapcode").val();
    var result =new Array();
    if(riskwrapcode=="ZZJ301"){
        result.push({value: "01",text: "无"});
        result.push({value: "02",text: "有"});

    }
    pickerIdType.setData(result);
    pickerIdType.show(function(selectItems) {

        $('#medical').html(selectItems[0].text);
       /* if(selectItems[0].text=="无"){
            planID="01"
        }else if(selectItems[0].text=="有"){
            planID="02"
        }
        $("#shebao").val(planID)
        $("#wra").val(planID)
        wrapid=$("#shebao").val();*/
        //ask(riskwrapcode,wrapid)
        //calcelement(wrapid)
    })

})
}
function ask(riskwrapcode,wrapid){
	$.ajax({
		async : true,
		type : "POST",
		contentType: "application/json;charset=UTF-8",
		url : basePath + '/mProductsDetailController/getLDTrialinfoByTP',
		data : "{\"riskwrapcode\": \""+riskwrapcode+"\",\"wrapid\": \"" + wrapid + "\"}",
		dataType : 'json',
		scriptCharset: 'utf-8',
		success : function(data) {
			var str="";
			var wrapidName ="";
			var wrap="";
			var wrap=updateWrapid(wrapid);
			str1="";
			for(var key in data){
				var map = data[key];
				if(map.dutyName != ""){
					str1=str1+map.dutyName+"<label style='font-size:12px;color:black;float:right;'>"+map.value+"</label><br>";	
				}
			} 
			$("#ins").html(str1);
			if(riskwrapcode=="ZZJ210"){
				$("#in").html(str1);
			}
			if(riskwrapcode=="ZZJ302"){
                $("#idtypevalueShow").html("计划三");
            }else {
                $("#idtypevalueShow").html(wrap);
			}
			/*$("#idtypevalueShow").html(wrap);*/
		}
	})
}

function updateWrapid(wrapID){
	if(wrapID=="01"){
		return showPlan="计划一"
	}else if(wrapID=="02"){
		return showPlan="计划二"
	}else if(wrapID=="03"){
		return showPlan="计划三"
	}
}
function updateshowPlan(showPlan){
	
	if(showPlan=="计划一"){
		return wrapID="01"
	}else if(showPlan=="计划二"){
		return wrapID="02"
	}else if(showPlan=="计划三"){
		return wrapID="03"
	}
}
function calcula(cvalidate,birthday,time,sex,wrapid,pinsoccupationcode,mult,riskwrapcode,insuyear,getlimit,getrate,amnt,riskcode,xbflag){
	var prem="";
	$.ajax({
		async : false,
		type : "GET",
		contentType: "application/json;charset=UTF-8",
		url : basePath + '/TrialController/trial?riskwrapcode='+ riskwrapcode + '&mult=' + mult + '&time=' + time + '&wrapid=' + wrapid + '&birthday=' + birthday + '&sex=' + sex + '&during=' + insuyear + '&amnt=' + amnt + '&amnt1=' + amnt + '&riskcode=' + riskcode + '&cvalidate=' + cvalidate + '&xbflag=' + xbflag,
		data :"",
		dataType : 'json',
		success : function(data) {
				//$("#prem").text(data.prem);
				//$("#average").text((data.prem/365).toFixed(2));
				//$("#prem").val(data.prem);
			prem = data.prem;

		},
		error: function(){
			mui.alert('试算失败,请确认信息是否完整');
		}
	});
	return prem;
}


function calcelement(wrapid)
{
	var xbflag="";
	//此套餐，有无社保相当 于计划来使用
	if("ZZJ210"==riskwrapcode)
	{
		var xbflag="01";
		$("#shebao").val($("#wrapid").val());
	}
	if("ZZJ202"==riskwrapcode){
		var xbflag="01";
		var time = "01";
	}
	if ("ZZJ302"==riskwrapcode){
		var xbflag="02";
		//var time=01;
	}
	var cvalidate = $("#cvalidate").val();
	var birthday = $("#insuredbirthday").val();
	//var time=$("#time").val();
	var sex=$("#insuredsex").val();
	//var wrapid = $("#wrapid").val();
	var pinsoccupationcode="";
	var insuyear="";
	
	var sumPrem =0.00;
	var calErrorFlag = "false";
	selectMultAndAmnt();
	//此套餐，保费只和年龄（生日，保障超期）、有无社保有关，所以这两个字段如果为空，则不进行试算
	if("ZZJ210"==riskwrapcode)
	{
		if(cvalidate==''||birthday==''||wrapid=='')
		{
			
			return false;
		}
	}
	if("ZZJ211"==riskwrapcode)
	{	
		if(cvalidate==''||birthday==''||sex=='')
		{
			return false;
		}
	}
	//此套餐，保费只和年龄（生日，保障超期）、有无社保有关，所以这两个字段如果为空，则不进行试算
	if("ZZJ202"==riskwrapcode)
	{
		if (cvalidate==""||birthday==""||wrapid==""||time=="") 
		{
			
			return false;
		}
	}
	if("ZZJ237"==riskwrapcode)
	{
		if (cvalidate==""||birthday==""||amnt=="") 
		{
			return false;
		}
	}
	if("ZZJ226"==riskwrapcode)
	{
		if(cvalidate==''||birthday==''||sex=='')
		{
			console.log("ZZJ226是false")
			return false;
		}
	}
	if("ZZJ301"==riskwrapcode || "ZZJ302"==riskwrapcode)
	{
		if (cvalidate==""||birthday==""||amnt=="")
		{
			return false;
		}
	}
	for(i=0;i<riskcode.length;i++)
	{
		var prem1 = calcula(cvalidate,birthday,time,sex,wrapid,pinsoccupationcode,mult[i],riskwrapcode,insuyear,getlimit[i],getrate[i],amnt[i],riskcode[i],xbflag);
		if(prem1 == "试算失败,请确认数据是否符合要求和格式")
		{
			mui.alert("被保险人年龄不在投保范围内，不能投保！");
			calErrorFlag = "true"
			$("#insuredidno").val('');
			birthdayCheck=""; 
			break;
		}
		else
		{
			sumPrem += prem1*1;
		}
		if("ZZJ226"==riskwrapcode)
		{
			break;
		}
		//			$("#average").text((prem/(365*insuyear)).toFixed(2));
	}
	if(calErrorFlag=="false")
	{
		console.log("进入后显示的金额为："+sumPrem);
		$("#prem").val(sumPrem);
		//如果要规定钱的格式 ，比如：132.00,需要重新格式 化下
		$("#premShow").html("￥<span>"+sumPrem+"</span>.00");
		
	}

}

//获取产品保额(amnt)和档次(mult)
function selectMultAndAmnt(){
	riskcode = [];
	mult = [];
	amnt = [];
	getlimit = [];
	getrate = [];
	var wrapID = $("#wra").val();
	var amntadd=0;
	$.ajax({
		async : false,
		type : "post",
		contentType: "application/json;charset=UTF-8",
		url : basePath + '/calculaPremController/selectMultAndAmnt',
		data :"{\"riskwrapcode\": \""+riskwrapcode+"\",\"wrapid\":\""+wrapID+"\"}",
		dataType : 'json',
		scriptCharset: 'utf-8',
		success : function(data) {
			for(i=0;i<data.length;i++){
				if(!contains(data[i].RiskCode,riskcode)){
					riskcode.push(data[i].RiskCode);
				}
				if(data[i].CalFactor == "Mult"){
					mult.push(data[i].CalFactorValue);
					$("#mult").val(data[i].CalFactorValue);
				}
				if(data[i].CalFactor == "Amnt"){
					amnt.push(data[i].CalFactorValue);
					$("#amnt").val(amnt);
				}
				if(data[i].CalFactor == "GetLimit"){
					getlimit.push(data[i].CalFactorValue);
					$("#getlimit").val(data[i].CalFactorValue);
				}
				if(data[i].CalFactor == "GetRate"){
					getrate.push(data[i].CalFactorValue);
					$("#getrate").val(data[i].CalFactorValue);
				}
			}
			for(i=0;i<amnt.length;i++){
				amntadd += parseInt(amnt[i]);
			}
			$("#amnt").val(amntadd);
		}
		
	})

	
	
}


//判断是否存在于数组中
function contains(obj,arr ) {
	  var i = arr.length;
	  while (i--) {
	    if (arr[i] == obj) {
	      return true;
	    }
	  }
	  return false;
}

function getDateByAge(age,type,M){
	var returndate="";
	var cvalidate = $("#cvalidate").val();
	$.ajax({
		async : false,
		type : "POST",
		contentType: "application/json;charset=UTF-8",
		url : basePath + '/calculaPremController/getDateByAge',
		data :  "{\"age\": \""+age+"\",\"cvalidate\":\""+cvalidate+"\",\"type\":\""+type+"\",\"M\":\""+M+"\"}",
		dataType : 'json',
		scriptCharset: 'utf-8',
		success : function(data) {
			returndate = data.date;
		}
	});
	return returndate;
}

//投保须知HTML，保险条款PDF弹窗显示
function getProductUrl(type){
	if(type == "pdf" || type == "rate"){
		$.ajax({
			async : false,
			type : "POST",
			contentType: "application/json;charset=UTF-8",
			url : basePath + '/insuranceClauseController/getProdutsUrl',
			data :  "{\"riskwrapcode\": \""+riskwrapcode+"\",\"type\":\""+type+"\"}",
			dataType : 'json',
			scriptCharset: 'utf-8',
			success : function(data) {
				for(var i = 0; i < data.length; i++){
					$("#riskcodepdf").append(
					'<div url="'+data[i].url+'" onclick="'+type+'('+(i+1)+')" class="yerCont" id="a_riskcode'+ type + (i+1)+'"><div class="contImg"><img src="'+basePath+'/img/icon/carImg01.png" /> '+
					'</div><div class="contTxt"><div class="tTit">'+$("#productname").val()+'</div><div class="tTxt" >'+data[i].name+
					'<ul><li id = "riskcodepdf" ></li></ul></div></div></div>');
				}
			}
		});
	}else{
		$.ajax({
			async : false,
			type : "POST",
			contentType: "application/json;charset=UTF-8",
			url : basePath + '/insuranceClauseController/getProdutsUrl',
			data :  "{\"riskwrapcode\": \""+riskwrapcode+"\",\"type\":\""+type+"\"}",
			dataType : 'json',
			scriptCharset: 'utf-8',
			
			success : function(data) {
				for(var i = 0; i < data.length; i++){
					$("#"+type).load(basePath+data[i]);
				}
			}
		});
	}	
}



function mustLoad()
{
	
	//《客户告知书》
	getProductUrl("pdf");
	//《保险条款》及费率 
	getProductUrl("rate");
	//《投保须知》
	getProductUrl("know");
	//没有点击查看投保须知
	clickBuyerGuide = "N";
	//是否同意投保须知
	agreeFlag = "N";
	mui('.mui-scroll-wrapper').scroll({
		deceleration: 0.0005 //flick 减速系数，系数越大，滚动速度越慢，滚动距离越小，默认值0.0006
	});
	/*//随页面滚动而滚动
	var spTop= $('#segmentedControl').offset().top
	$(window).scroll(function(){
	 	//导航栏滚动
	 	var wintop =$(window).scrollTop()
	 	var rollTop = spTop-wintop;
	 	if(rollTop<=0){
	 		$('#segmentedControl').addClass('fied');
	 	}else{
	 		$('#segmentedControl').removeClass('fied');
	 	}
	 	
	})*/
	 	
}

//初始化时，判断下，是回退还是第一次进页面
function initLoad()
{
	mustLoad();
	var messagesession = sessionStorage.getItem(riskwrapcode+"message");	//回退时页面上需要显示的数据
	if(messagesession!=''&&null != messagesession)
	{
		sessionStorage.removeItem(riskwrapcode+"message");
		reLoad();
	}
	else
	{
		firstLoad();
	}
}
function reLoad()
{
	//没有点击查看投保须知
    clickBuyerGuide = "Y";
    //clickBuyerGuide = "Y";
    //是否同意投保须知
    agreeFlag = "Y";	
}
function firstLoad()
{
	$('#checterm').prop("checked", false);

}

function pdf(num){
	 var url = $('#a_riskcodepdf'+num).attr("url");
	 assignment();
	 window.open(basePath+ '/pdfjs/web/viewer.html?file='+basePath+'/'+url);
}
function rate(num){
	 var url = $('#a_riskcoderate'+num).attr("url");
	 assignment();
	 window.open(basePath+ '/pdfjs/web/viewer.html?file='+basePath+'/'+url);
	
}

function assignment(){
	sessionStorage.removeItem(riskwrapcode+"message");
	sessionStorage.setItem(riskwrapcode+"message","riskwrapcode");
}
//判断字符是否为空的方法
function isEmpty(obj){
  if(typeof obj == "undefined" || obj == null || obj == ""){
      return true;
  }else{
      return false;
  }
}



function pay(){
	console.log('pay')
	if(!check()){
			return;
	}
	layer.open({
			type: 2
			,content: '正在跳转支付，请不要离开当前页面'
	});
	//埋点，用来统计
	//meteor.track('shopping', {convert_id: 1619715212398599 });
	$("#form1").submit();

}

